<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>IgH EtherCAT Master: domain.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">IgH EtherCAT Master
   &#160;<span id="projectnumber">1.5.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('domain_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">domain.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>EtherCAT domain methods.  
<a href="#details">More...</a></p>

<p><a href="domain_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a06f1befc7d03dbef13e823d26863aec4"><td class="memItemLeft" align="right" valign="top"><a id="a06f1befc7d03dbef13e823d26863aec4"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#a06f1befc7d03dbef13e823d26863aec4">DEBUG_REDUNDANCY</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:a06f1befc7d03dbef13e823d26863aec4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extra debug output for redundancy functions. <br /></td></tr>
<tr class="separator:a06f1befc7d03dbef13e823d26863aec4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:acdb99d1f2a267eae55d21b2eb5ff0d06"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#acdb99d1f2a267eae55d21b2eb5ff0d06">ec_domain_clear_data</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain)</td></tr>
<tr class="memdesc:acdb99d1f2a267eae55d21b2eb5ff0d06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees internally allocated memory.  <a href="#acdb99d1f2a267eae55d21b2eb5ff0d06">More...</a><br /></td></tr>
<tr class="separator:acdb99d1f2a267eae55d21b2eb5ff0d06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a541742767f0adada4d91f56f26d4250c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#a541742767f0adada4d91f56f26d4250c">ec_domain_init</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain, <a class="el" href="group__ApplicationInterface.html#ga60ec31b46fcf7994c511359402c64baa">ec_master_t</a> *master, unsigned int index)</td></tr>
<tr class="memdesc:a541742767f0adada4d91f56f26d4250c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Domain constructor.  <a href="#a541742767f0adada4d91f56f26d4250c">More...</a><br /></td></tr>
<tr class="separator:a541742767f0adada4d91f56f26d4250c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4dd81f20a9fdb52e15b802afefd47d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#af4dd81f20a9fdb52e15b802afefd47d3">ec_domain_clear</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain)</td></tr>
<tr class="memdesc:af4dd81f20a9fdb52e15b802afefd47d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Domain destructor.  <a href="#af4dd81f20a9fdb52e15b802afefd47d3">More...</a><br /></td></tr>
<tr class="separator:af4dd81f20a9fdb52e15b802afefd47d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bd01575864546e8f5929752e54456b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#a5bd01575864546e8f5929752e54456b6">ec_domain_add_fmmu_config</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain, <a class="el" href="structec__fmmu__config__t.html">ec_fmmu_config_t</a> *fmmu)</td></tr>
<tr class="memdesc:a5bd01575864546e8f5929752e54456b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds an FMMU configuration to the domain.  <a href="#a5bd01575864546e8f5929752e54456b6">More...</a><br /></td></tr>
<tr class="separator:a5bd01575864546e8f5929752e54456b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff1ea02398e17bf036e69a594844da85"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#aff1ea02398e17bf036e69a594844da85">ec_domain_add_datagram_pair</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain, uint32_t logical_offset, size_t data_size, uint8_t *data, const unsigned int used[])</td></tr>
<tr class="memdesc:aff1ea02398e17bf036e69a594844da85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a domain datagram pair and appends it to the list.  <a href="#aff1ea02398e17bf036e69a594844da85">More...</a><br /></td></tr>
<tr class="separator:aff1ea02398e17bf036e69a594844da85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb9f97fed0d3173fb741b64afd115602"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#acb9f97fed0d3173fb741b64afd115602">shall_count</a> (const <a class="el" href="structec__fmmu__config__t.html">ec_fmmu_config_t</a> *cur_fmmu, const <a class="el" href="structec__fmmu__config__t.html">ec_fmmu_config_t</a> *first_fmmu)</td></tr>
<tr class="memdesc:acb9f97fed0d3173fb741b64afd115602"><td class="mdescLeft">&#160;</td><td class="mdescRight">Domain finish helper function.  <a href="#acb9f97fed0d3173fb741b64afd115602">More...</a><br /></td></tr>
<tr class="separator:acb9f97fed0d3173fb741b64afd115602"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d8b30e08d2cd063b5e55e07e54c8852"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#a2d8b30e08d2cd063b5e55e07e54c8852">ec_domain_finish</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain, uint32_t base_address)</td></tr>
<tr class="memdesc:a2d8b30e08d2cd063b5e55e07e54c8852"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finishes a domain.  <a href="#a2d8b30e08d2cd063b5e55e07e54c8852">More...</a><br /></td></tr>
<tr class="separator:a2d8b30e08d2cd063b5e55e07e54c8852"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7af777c7a15fc667d283794dcf2cc498"><td class="memItemLeft" align="right" valign="top"><a id="a7af777c7a15fc667d283794dcf2cc498"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#a7af777c7a15fc667d283794dcf2cc498">ec_domain_fmmu_count</a> (const <a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain)</td></tr>
<tr class="memdesc:a7af777c7a15fc667d283794dcf2cc498"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of FMMU configurations of the domain. <br /></td></tr>
<tr class="separator:a7af777c7a15fc667d283794dcf2cc498"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f9bffd81ad553290bf06b7406d08e6b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structec__fmmu__config__t.html">ec_fmmu_config_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="domain_8c.html#a3f9bffd81ad553290bf06b7406d08e6b">ec_domain_find_fmmu</a> (const <a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain, unsigned int pos)</td></tr>
<tr class="memdesc:a3f9bffd81ad553290bf06b7406d08e6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a certain FMMU configuration via its position in the list.  <a href="#a3f9bffd81ad553290bf06b7406d08e6b">More...</a><br /></td></tr>
<tr class="separator:a3f9bffd81ad553290bf06b7406d08e6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa34bed589e356727aaf0bc7ceee0ed57"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ApplicationInterface.html#gaa34bed589e356727aaf0bc7ceee0ed57">ecrt_domain_reg_pdo_entry_list</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain, const <a class="el" href="structec__pdo__entry__reg__t.html">ec_pdo_entry_reg_t</a> *regs)</td></tr>
<tr class="memdesc:gaa34bed589e356727aaf0bc7ceee0ed57"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers a bunch of PDO entries for a domain.  <a href="group__ApplicationInterface.html#gaa34bed589e356727aaf0bc7ceee0ed57">More...</a><br /></td></tr>
<tr class="separator:gaa34bed589e356727aaf0bc7ceee0ed57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadc492ba8af1b53bfec60748c441f7a10"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ApplicationInterface.html#gadc492ba8af1b53bfec60748c441f7a10">ecrt_domain_size</a> (const <a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain)</td></tr>
<tr class="memdesc:gadc492ba8af1b53bfec60748c441f7a10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current size of the domain's process data.  <a href="group__ApplicationInterface.html#gadc492ba8af1b53bfec60748c441f7a10">More...</a><br /></td></tr>
<tr class="separator:gadc492ba8af1b53bfec60748c441f7a10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaafe96aea4c5babcfe433f41e0c84a165"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ApplicationInterface.html#gaafe96aea4c5babcfe433f41e0c84a165">ecrt_domain_external_memory</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain, uint8_t *mem)</td></tr>
<tr class="memdesc:gaafe96aea4c5babcfe433f41e0c84a165"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provide external memory to store the domain's process data.  <a href="group__ApplicationInterface.html#gaafe96aea4c5babcfe433f41e0c84a165">More...</a><br /></td></tr>
<tr class="separator:gaafe96aea4c5babcfe433f41e0c84a165"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga701738b03629d552c15c2cdd9b7b99c2"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ApplicationInterface.html#ga701738b03629d552c15c2cdd9b7b99c2">ecrt_domain_data</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain)</td></tr>
<tr class="memdesc:ga701738b03629d552c15c2cdd9b7b99c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the domain's process data.  <a href="group__ApplicationInterface.html#ga701738b03629d552c15c2cdd9b7b99c2">More...</a><br /></td></tr>
<tr class="separator:ga701738b03629d552c15c2cdd9b7b99c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gace65c0f94caa798d1f5930c1317dfd5c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ApplicationInterface.html#gace65c0f94caa798d1f5930c1317dfd5c">ecrt_domain_process</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain)</td></tr>
<tr class="memdesc:gace65c0f94caa798d1f5930c1317dfd5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines the states of the domain's datagrams.  <a href="group__ApplicationInterface.html#gace65c0f94caa798d1f5930c1317dfd5c">More...</a><br /></td></tr>
<tr class="separator:gace65c0f94caa798d1f5930c1317dfd5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5367e6982fae333765231a2c50579a96"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ApplicationInterface.html#ga5367e6982fae333765231a2c50579a96">ecrt_domain_queue</a> (<a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain)</td></tr>
<tr class="memdesc:ga5367e6982fae333765231a2c50579a96"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Re-)queues all domain datagrams in the master's datagram queue.  <a href="group__ApplicationInterface.html#ga5367e6982fae333765231a2c50579a96">More...</a><br /></td></tr>
<tr class="separator:ga5367e6982fae333765231a2c50579a96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab8fdd6b9dc3f33d22800d8c517f864a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ApplicationInterface.html#gaab8fdd6b9dc3f33d22800d8c517f864a">ecrt_domain_state</a> (const <a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *domain, <a class="el" href="structec__domain__state__t.html">ec_domain_state_t</a> *state)</td></tr>
<tr class="memdesc:gaab8fdd6b9dc3f33d22800d8c517f864a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the state of a domain.  <a href="group__ApplicationInterface.html#gaab8fdd6b9dc3f33d22800d8c517f864a">More...</a><br /></td></tr>
<tr class="separator:gaab8fdd6b9dc3f33d22800d8c517f864a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>EtherCAT domain methods. </p>

<p class="definition">Definition in file <a class="el" href="domain_8c_source.html">domain.c</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="acdb99d1f2a267eae55d21b2eb5ff0d06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acdb99d1f2a267eae55d21b2eb5ff0d06">&#9670;&nbsp;</a></span>ec_domain_clear_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_domain_clear_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *&#160;</td>
          <td class="paramname"><em>domain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Frees internally allocated memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>EtherCAT domain. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="domain_8c_source.html#l00106">106</a> of file <a class="el" href="domain_8c_source.html">domain.c</a>.</p>

</div>
</div>
<a id="a541742767f0adada4d91f56f26d4250c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a541742767f0adada4d91f56f26d4250c">&#9670;&nbsp;</a></span>ec_domain_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_domain_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__ApplicationInterface.html#ga60ec31b46fcf7994c511359402c64baa">ec_master_t</a> *&#160;</td>
          <td class="paramname"><em>master</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Domain constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>EtherCAT domain. </td></tr>
    <tr><td class="paramname">master</td><td>Parent master. </td></tr>
    <tr><td class="paramname">index</td><td>Index. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="domain_8c_source.html#l00058">58</a> of file <a class="el" href="domain_8c_source.html">domain.c</a>.</p>

</div>
</div>
<a id="af4dd81f20a9fdb52e15b802afefd47d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4dd81f20a9fdb52e15b802afefd47d3">&#9670;&nbsp;</a></span>ec_domain_clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_domain_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *&#160;</td>
          <td class="paramname"><em>domain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Domain destructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>EtherCAT domain </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="domain_8c_source.html#l00088">88</a> of file <a class="el" href="domain_8c_source.html">domain.c</a>.</p>

</div>
</div>
<a id="a5bd01575864546e8f5929752e54456b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5bd01575864546e8f5929752e54456b6">&#9670;&nbsp;</a></span>ec_domain_add_fmmu_config()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_domain_add_fmmu_config </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structec__fmmu__config__t.html">ec_fmmu_config_t</a> *&#160;</td>
          <td class="paramname"><em>fmmu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds an FMMU configuration to the domain. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>EtherCAT domain. </td></tr>
    <tr><td class="paramname">fmmu</td><td>FMMU configuration. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="domain_8c_source.html#l00122">122</a> of file <a class="el" href="domain_8c_source.html">domain.c</a>.</p>

</div>
</div>
<a id="aff1ea02398e17bf036e69a594844da85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff1ea02398e17bf036e69a594844da85">&#9670;&nbsp;</a></span>ec_domain_add_datagram_pair()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_domain_add_datagram_pair </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>logical_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>data_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned int&#160;</td>
          <td class="paramname"><em>used</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocates a domain datagram pair and appends it to the list. </p>
<p>The datagrams' types and expected working counters are determined by the number of input and output fmmus that share the datagrams.</p>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>Success. </td></tr>
    <tr><td class="paramname">&lt;0</td><td>Error code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>EtherCAT domain. </td></tr>
    <tr><td class="paramname">logical_offset</td><td>Logical offset. </td></tr>
    <tr><td class="paramname">data_size</td><td>Size of the data. </td></tr>
    <tr><td class="paramname">data</td><td>Process data. </td></tr>
    <tr><td class="paramname">used</td><td>Slave config counter for in/out. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="domain_8c_source.html#l00147">147</a> of file <a class="el" href="domain_8c_source.html">domain.c</a>.</p>

</div>
</div>
<a id="acb9f97fed0d3173fb741b64afd115602"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb9f97fed0d3173fb741b64afd115602">&#9670;&nbsp;</a></span>shall_count()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int shall_count </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structec__fmmu__config__t.html">ec_fmmu_config_t</a> *&#160;</td>
          <td class="paramname"><em>cur_fmmu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structec__fmmu__config__t.html">ec_fmmu_config_t</a> *&#160;</td>
          <td class="paramname"><em>first_fmmu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Domain finish helper function. </p>
<p>Detects, if a slave configuration has already been taken into account for a datagram's expected working counter calculation.</p>
<p>Walks through the list of all FMMU configurations for the current datagram and ends before the current datagram.</p>
<dl class="section return"><dt>Returns</dt><dd>Non-zero if slave connfig was already counted. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cur_fmmu</td><td>Current FMMU with direction to search for. </td></tr>
    <tr><td class="paramname">first_fmmu</td><td>Datagram's first FMMU. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="domain_8c_source.html#l00195">195</a> of file <a class="el" href="domain_8c_source.html">domain.c</a>.</p>

</div>
</div>
<a id="a2d8b30e08d2cd063b5e55e07e54c8852"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d8b30e08d2cd063b5e55e07e54c8852">&#9670;&nbsp;</a></span>ec_domain_finish()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_domain_finish </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>base_address</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finishes a domain. </p>
<p>This allocates the necessary datagrams and writes the correct logical addresses to every configured FMMU.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Check for FMMUs that do not fit into any datagram.</dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>Success </td></tr>
    <tr><td class="paramname">&lt;0</td><td>Error code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>EtherCAT domain. </td></tr>
    <tr><td class="paramname">base_address</td><td>Logical base address. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="domain_8c_source.html#l00226">226</a> of file <a class="el" href="domain_8c_source.html">domain.c</a>.</p>

</div>
</div>
<a id="a3f9bffd81ad553290bf06b7406d08e6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f9bffd81ad553290bf06b7406d08e6b">&#9670;&nbsp;</a></span>ec_domain_find_fmmu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structec__fmmu__config__t.html">ec_fmmu_config_t</a>* ec_domain_find_fmmu </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__ApplicationInterface.html#ga80023c0c77cb39ae1cd70c9d8e5269fc">ec_domain_t</a> *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a certain FMMU configuration via its position in the list. </p>
<dl class="section return"><dt>Returns</dt><dd>FMMU at position <em>pos</em>, or NULL. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>EtherCAT domain. </td></tr>
    <tr><td class="paramname">pos</td><td>List position. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="domain_8c_source.html#l00350">350</a> of file <a class="el" href="domain_8c_source.html">domain.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_c1346cf4828efdd0d2baf0d391d01b77.html">master</a></li><li class="navelem"><a class="el" href="domain_8c.html">domain.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
